﻿using PLCSharp.CoreModel.Prism;
using Prism.Dialogs;
using Prism.Events;
using Prism.Ioc;

namespace PLCSharp.Views.Authority
{
    public class PasswordChangeViewModel : DialogAwareBase
    {
        private string _Name;

        public PasswordChangeViewModel(IContainerExtension container, IEventAggregator ea, IDialogService dialogService) : base(container, ea, dialogService)
        {
            Model = container.Resolve<LoginModel>();
        }

        public string Name
        {
            get { return _Name; }
            set { SetProperty(ref _Name, value); }
        }



        public override void OnDialogOpened(IDialogParameters parameters)
        {
            Name = parameters.GetValue<string>("name");
            Title = $" 正在修改用户: {Name} 的密码";
        }

        public LoginModel Model { get; set; }
 



    }
}